package com.huilian.iotbox.data.dao;

import com.huilian.iotbox.data.dto.OrderDto;
import com.huilian.iotbox.data.po.Order;
import com.huilian.iotbox.data.vo.OrderVo;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;

@Mapper
public interface OrderCommonDao {
    int insert(Order order);

    /**
     * 根据第三方订单号和收款商户类型
     */
    OrderVo findOrderByPayChannelOrderNo(OrderDto orderDto);

    /**
     * 根据第三方订单号和收款商户类型和抖音订单certificate_id
     */
    OrderVo findOrderByPayChannelOrderNoAndDYId(OrderDto orderDto);

    /**
     * 修改订单状态
     */
    Integer updateStatusById(Order order);

    int updateOrderTotalAmount(Order updateOrder);

    Integer updateHandlingCharge(Long orderId, BigDecimal handlingCharge);
    OrderVo findByOperationUserId(OrderDto orderDto);
}
